﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ForumThread.aspx.cs" Inherits="it_security_project.ForumThread" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form runat="server">
    <asp:ValidationSummary ID="ValidationTitle" runat="server" ValidationGroup="ThreadTitle" />
    <asp:ValidationSummary ID="ValidationComment" runat="server" ValidationGroup="ThreadComment" />

    

        <div id="ThreadTitleDiv">
        <h2><asp:Label runat="server" ID="TitleLabel"></asp:Label></h2>
        <h3><asp:Label runat="server" ID="AuthorLabel"></asp:Label></h3>       
         <asp:TextBox ID="TitleContentLabel" runat="server" TextMode="MultiLine"  Width="320px" Height="120px" style="resize: none"></asp:TextBox> <br />
         <br />
    </div>

    <asp:ObjectDataSource ID="CommentObjectDataSource" runat="server" TypeName="it_security_project.App_Code.BusinessLogicLayer.Service"
    SelectMethod="GetCommentsOnThreadId">
        <SelectParameters>
            <asp:QueryStringParameter QueryStringField="thread" Name="thread" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    
    <asp:ListView ID="CommentListView" runat="server"  DataSourceID="CommentObjectDataSource">
        <LayoutTemplate>
                <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
        </LayoutTemplate>
        
        <ItemTemplate>
            <div class="Comment">
            <asp:Label ID="CommentUserID" CssClass="ForumCommentHeader" runat="server" Text='<%# Eval("Username") + ":" %>' /> 
            <br />
            <asp:Label ID="CommentContentID" runat="server" Text='<%# Eval("Content") %>' />
            <br />
            <br />
            </div>
        </ItemTemplate>
    </asp:ListView>


    <asp:Panel ID="PanelNewComment" runat="server">
    <div class="newComment">
        <br />
        <asp:Label ID="newCommentLbl" runat="server" Text="New Comment"></asp:Label>
        <br />
        <asp:TextBox ID="newCommentTextBox" runat="server" TextMode="MultiLine" style="resize: none" Width="240px" Height="120px"></asp:TextBox>
        <br />
        <br />
        <asp:Image ID="ImageCaptacha" runat="server" CssClass="CaptchaImage" />
        <br />
        <asp:Label ID="FUUUSK" Enabled="false" Visible="false" runat="server" Text="Label"></asp:Label>
        <asp:TextBox ID="TextBoxCaptcha" runat="server"></asp:TextBox>
        <asp:Button ID="newCommentBtn" runat="server" Text="Submit" 
            OnClick="newCommentBtn_Click" />
    </div>
    </asp:Panel>
    </form>
</asp:Content>
